<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/easycommon.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="utf-8">
    <style>
    	table{font-size:14px}
    </style>
    <script>
    	 $(document).ready(function() {
    		 var datagrid; //定义全局变量datagrid
   	         datagrid = $('#datatable').datagrid({
   	    		 //rownumbers:true,
   	    		 singleSelect:true,
   	    		 pagination:true,
   	    		 pageSize:10,
   	    		 //singleSelect:false,
   	    		 fit: true, //datagrid自适应宽度
   	             fitColumn: false, //列自适应宽度
   	             striped: true, //行背景交换
   	             nowap: true, //列内容多时自动折至第二行
   	             border: false,
   	             //idField: 'id', //主键
   	    		 url:"${path}/portal/queryRdkhList",
   	    		 columns:[[
   	    			 {field:'customerName',title:'客户名',width:100,formatter:formatOper},
   	    			 {field:'phoneNumber',title:'手机号',width:100},
   					 {field:'sex', title: '性别', width: 60}
   	    		 ]]
   	    	 });
	   	      var p = datagrid.datagrid('getPager');
	          $(p).pagination({
	             pageSize: 10,//每页显示的记录条数，默认为10  
	             pageList: [10, 20],//可以设置每页记录条数的列表  
	             beforePageText: '第',//页数文本框前显示的汉字  
	             afterPageText: '页    共 {pages} 页',
	             displayMsg: ' {from} - {to}  共{total}条',
	          });
    	 });
    	 
    	 function formatOper(val,row,index){
   			 return '<a href="#" onclick="parent.showPop(\''+row.id+'\')">'+val+'</a>';
   		 }
    	 
         
    </script>
</head>
<body >
	<table id="datatable" class="easyui-datagrid" 
			singleSelect="true" iconCls="icon-save">
	</table>
</body>
</html>
